<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
// load tooltip behavior
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');

?>
<form action="<?php echo JRoute::_('index.php?option=com_forum&view=posts'); ?>" method="post" name="adminForm">
	<table class="adminlist">
		<thead>
		<tr>
			<th width="5">
				<?php echo JText::_('JGLOBAL_FIELD_ID_LABEL'); ?>
			</th>
			<th width="20">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
			</th>			
			<th>
				<?php echo JText::_('JGLOBAL_TITLE'); ?>
			</th>
			<th width="10%">
				<?php echo JText::_('JGLOBAL_FIELD_CREATED_LABEL'); ?>
			</th>
			<th width="20%">
				<?php echo JText::_('JGLOBAL_FIELD_CREATED_BY_LABEL'); ?>
			</th>
		</tr>

		</thead>
		<tbody>
	<?php foreach($this->items as $i => $item): ?>
		<tr class="row<?php echo $i % 2; ?>">
			<td>
				<?php echo $item->id; ?>
			</td>
			<td>
				<?php echo JHtml::_('grid.id', $i, $item->id); ?>
			</td>
			<td>
							<a href="<?php echo JRoute::_('index.php?option=com_forum&task=post.edit&id='.(int) $item->id); ?>">
								<?php echo $this->escape($item->title); ?></a>
			</td>
			<td>
				<?php echo $item->created; ?>
			</td>
			<td>
				<?php echo $item->author_name; ?>
			</td>
		</tr>
	<?php endforeach; ?>		
		</tbody>
		<tfoot>
		<tr>
			<td colspan="5"><?php echo $this->pagination->getListFooter(); ?></td>
		</tr>

		</tfoot>
	</table>
	<div>
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
